import request from "@/utils/request"
import config from "@/config"

export default {
    add: {
        url: `${config.API_PREFIX}/system/dept`,
        name: "新增系统部门",
        post: function (addDto) {
            return request.post(this.url, addDto);
        }
    },
    del: {
        url: `${config.API_PREFIX}/system/dept`,
        name: "单（多）选删除系统部门",
        delete: function (ids) {
            return request.delete(this.url, ids);
        }
    },
    edit: {
        url: `${config.API_PREFIX}/system/dept`,
        name: "修改系统部门",
        put: function (editDto) {
            return request.put(this.url, editDto);
        }
    },
    info: {
        url: `${config.API_PREFIX}/system/dept`,
        name: "根据主键查询系统部门",
        get: function (id, isExtend = false) {
            return request.get(this.url + `/${id}`, {isExtend: isExtend});
        }
    },
    lists: {
        url: `${config.API_PREFIX}/system/dept/lists`,
        name: "（可分页）查询系统部门列表",
        get: function (queryDto) {
            return request.get(this.url, queryDto);
        }
    }
}